package com.xyh.service.impl;

import com.xyh.entity.YxcUser;
import com.xyh.mapper.YxcUserMapper;
import com.xyh.service.YxcUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class YxcUserServiceImpl implements YxcUserService {

    @Resource
    private YxcUserMapper yxcUserMapper;

    @Override
    public YxcUser selectByTelephone(String login_telephone) {
        return yxcUserMapper.selectByTelephone(login_telephone);
    }

    @Override
    public int updateYxcUser(YxcUser yxcUser) {
        return yxcUserMapper.updateYxcUser(yxcUser);
    }

    @Override
    public int insertNewUser(String login_telephone, String login_password) {
        return yxcUserMapper.insertNewUser(login_telephone,login_password);
    }

    @Override
    public int updateYhqByPhone(String owner_telephone) {
        return yxcUserMapper.updateYhqByPhone(owner_telephone);
    }

    @Override
    public int updateXiaofeiByPhone(String owner_telephone,int xiaofei) {
        return yxcUserMapper.updateXiaofeiByPhone(owner_telephone,xiaofei);
    }

    @Override
    public int updateJifenAndYhqByPhone(String telephone, int jifen_jian, int yhq_add) {
        return yxcUserMapper.updateJifenAndYhqByPhone(telephone,jifen_jian,yhq_add);
    }
}
